package com.ckzp.weixin.model;

import com.ckzp.core.json.JsonUtil;

/**
 * Created by 51594 on 2022/8/15.
 */
public class WxUserToken {


    public String session_key;
    public String access_token;
    public String expires_in;
    public String refresh_token;
    public String openid;
    public String unionid;
    public String scope;
    public String errcode = "9";
    public String errmsg;
    public Integer is_snapshotuser;

    public String getAccess_token() {
        return access_token;
    }

    public void setAccess_token(String access_token) {
        this.access_token = access_token;
    }

    public String getExpires_in() {
        return expires_in;
    }

    public void setExpires_in(String expires_in) {
        this.expires_in = expires_in;
    }

    public String getRefresh_token() {
        return refresh_token;
    }

    public void setRefresh_token(String refresh_token) {
        this.refresh_token = refresh_token;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getErrcode() {
        return errcode;
    }

    public WxUserToken setErrcode(String errcode) {
        this.errcode = errcode;
        return this;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public WxUserToken setErrmsg(String errmsg) {
        this.errmsg = errmsg;
        return this;
    }

    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public String getSession_key() {
        return session_key;
    }

    public void setSession_key(String session_key) {
        this.session_key = session_key;
    }

    public Integer getIs_snapshotuser() {
        return is_snapshotuser;
    }

    public void setIs_snapshotuser(Integer is_snapshotuser) {
        this.is_snapshotuser = is_snapshotuser;
    }

    @Override
    public String toString() {
        return "WxUserToken{" +
                "access_token='" + access_token + '\'' +
                ", expires_in='" + expires_in + '\'' +
                ", refresh_token='" + refresh_token + '\'' +
                ", openid='" + openid + '\'' +
                ", unionid='" + unionid + '\'' +
                ", scope='" + scope + '\'' +
                ", errcode='" + errcode + '\'' +
                ", errmsg='" + errmsg + '\'' +
                '}';
    }

    public String toJson() {
        return JsonUtil.toJsonString(this);
    }
}
